package com.hz.springbootschedule.controller;

import com.hz.springbootschedule.pojo.SmbmsUser;
import com.hz.springbootschedule.service.UserService;
import com.hz.springbootschedule.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create 2023-02-13 16:14
 */
@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private UserService userService;
    @Autowired
    private RedisUtil redisUtil;

    @PostMapping("/login")
    public SmbmsUser login(String name, String pwd){
      return userService.login(name,pwd);
    }


    @GetMapping("/info")
    public String info(){

        return "这是info";
    }
}
